package com.wuchao.signer.proxy;
interface Show{
    public void show();
}
class Z1 implements Show{//目标
    @Override
    public void show() {
       // System.out.println("开");
        System.out.println("我是z1");
       // System.out.println("关");
    }
}
class Z2 implements Show{//代理人
    private Z1 z1;
    public Z2(Z1 z1){
        this.z1=z1;
    }
    @Override
    public void show() {
         System.out.println("开");
         z1.show();
         System.out.println("关");
    }
}

public class T {
    public static void main(String[] args) {
        new Z2(new Z1()).show();

    }
}
